An implementation of the MD5 cryptographic hash algorithm.
Usage
# extern crate hex_literal;
# extern crate md5;
#
Also see RustCrypto/hashes readme.
An implementation of the MD5 cryptographic hash algorithm.
# #[macro_use] extern crate hex_literal;
# extern crate md5;
# fn main() {
use md5::{Md5, Digest};
// create a Md5 hasher instance
let mut hasher = Md5::new();
// process input message
hasher.input(b"hello world");
// acquire hash digest in the form of GenericArray,
// which in this case is equivalent to [u8; 16]
let result = hasher.result();
assert_eq!(result[..], hex!("5eb63bbbe01eeed093cb22bb8f5acdc3"));
# }
Also see RustCrypto/hashes readme.